//package com.mini.controller;
//
//import com.mini.vo.BusinessResult;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@RestController
//@RequestMapping("/aes")
//@Slf4j
//@Api(tags = "测试-加解密")
//public class AESController extends BaseController {
//
//    @Autowired
//    private AttnClassService classService;
//
//    @ApiOperation(value = "字符串加密")
//    @GetMapping(value = "/encrypt")
//    public BusinessResult encrypt(@ApiParam(value = "要加密的字符串")@RequestParam String str){
//        return BusinessResult.createSuccessInstance(classService.encryptField(str));
//    }
//
//    @ApiOperation(value = "字符串解密")
//    @GetMapping(value = "/decrypt")
//    public BusinessResult decrypt(@ApiParam(value = "要解密的字符串")@RequestParam String str){
//        return BusinessResult.createSuccessInstance(classService.decryptField(str));
//    }
//
//    @ApiOperation(value = "字符串加密-多个")
//    @PostMapping(value = "/encrypt/list")
//    public BusinessResult encryptList(@ApiParam(value = "要加密的字符串-逗号隔开")@RequestBody List<String> list){
//        List<String> encrypts = new ArrayList();
//        list.stream().forEach(str -> encrypts.add(classService.encryptField(str)));
//        return BusinessResult.createSuccessInstance(encrypts);
//    }
//
//    @ApiOperation(value = "字符串解密")
//    @PostMapping(value = "/decrypt/list")
//    public BusinessResult decryptList(@ApiParam(value = "要解密的字符串-逗号隔开")@RequestBody List<String> list){
//        List<String> decrypts = new ArrayList();
//        list.stream().forEach(str -> decrypts.add(classService.encryptField(str)));
//        return BusinessResult.createSuccessInstance(decrypts);
//    }
//}
